↳ Prolog
↳ PrologToPiTRSProof
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
FACTOR_IN(.(X, .(Y, Xs)), T) → U11(X, Y, Xs, T, times_in(X, Y, Z))
FACTOR_IN(.(X, .(Y, Xs)), T) → TIMES_IN(X, Y, Z)
TIMES_IN(s(X), Y, Z) → U31(X, Y, Z, times_in(X, Y, XY))
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, XY)
U31(X, Y, Z, times_out(X, Y, XY)) → U41(X, Y, Z, plus_in(XY, Y, Z))
U31(X, Y, Z, times_out(X, Y, XY)) → PLUS_IN(XY, Y, Z)
PLUS_IN(s(X), Y, s(Z)) → U51(X, Y, Z, plus_in(X, Y, Z))
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
U11(X, Y, Xs, T, times_out(X, Y, Z)) → U21(X, Y, Xs, T, factor_in(.(Z, Xs), T))
U11(X, Y, Xs, T, times_out(X, Y, Z)) → FACTOR_IN(.(Z, Xs), T)
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
FACTOR_IN(.(X, .(Y, Xs)), T) → U11(X, Y, Xs, T, times_in(X, Y, Z))
FACTOR_IN(.(X, .(Y, Xs)), T) → TIMES_IN(X, Y, Z)
TIMES_IN(s(X), Y, Z) → U31(X, Y, Z, times_in(X, Y, XY))
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, XY)
U31(X, Y, Z, times_out(X, Y, XY)) → U41(X, Y, Z, plus_in(XY, Y, Z))
U31(X, Y, Z, times_out(X, Y, XY)) → PLUS_IN(XY, Y, Z)
PLUS_IN(s(X), Y, s(Z)) → U51(X, Y, Z, plus_in(X, Y, Z))
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
U11(X, Y, Xs, T, times_out(X, Y, Z)) → U21(X, Y, Xs, T, factor_in(.(Z, Xs), T))
U11(X, Y, Xs, T, times_out(X, Y, Z)) → FACTOR_IN(.(Z, Xs), T)
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
PLUS_IN(s(X), Y, s(Z)) → PLUS_IN(X, Y, Z)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PiDP
PLUS_IN(s(X), Y) → PLUS_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, XY)
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
TIMES_IN(s(X), Y, Z) → TIMES_IN(X, Y, XY)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
TIMES_IN(s(X), Y) → TIMES_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
FACTOR_IN(.(X, .(Y, Xs)), T) → U11(X, Y, Xs, T, times_in(X, Y, Z))
U11(X, Y, Xs, T, times_out(X, Y, Z)) → FACTOR_IN(.(Z, Xs), T)
factor_in(.(X, .(Y, Xs)), T) → U1(X, Y, Xs, T, times_in(X, Y, Z))
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
U1(X, Y, Xs, T, times_out(X, Y, Z)) → U2(X, Y, Xs, T, factor_in(.(Z, Xs), T))
factor_in(.(X, []), X) → factor_out(.(X, []), X)
U2(X, Y, Xs, T, factor_out(.(Z, Xs), T)) → factor_out(.(X, .(Y, Xs)), T)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
FACTOR_IN(.(X, .(Y, Xs)), T) → U11(X, Y, Xs, T, times_in(X, Y, Z))
U11(X, Y, Xs, T, times_out(X, Y, Z)) → FACTOR_IN(.(Z, Xs), T)
times_in(s(X), Y, Z) → U3(X, Y, Z, times_in(X, Y, XY))
times_in(0, X_, 0) → times_out(0, X_, 0)
U3(X, Y, Z, times_out(X, Y, XY)) → U4(X, Y, Z, plus_in(XY, Y, Z))
U4(X, Y, Z, plus_out(XY, Y, Z)) → times_out(s(X), Y, Z)
plus_in(s(X), Y, s(Z)) → U5(X, Y, Z, plus_in(X, Y, Z))
plus_in(0, X, X) → plus_out(0, X, X)
U5(X, Y, Z, plus_out(X, Y, Z)) → plus_out(s(X), Y, s(Z))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
FACTOR_IN(.(X, .(Y, Xs))) → U11(Xs, times_in(X, Y))
U11(Xs, times_out(Z)) → FACTOR_IN(.(Z, Xs))
times_in(s(X), Y) → U3(Y, times_in(X, Y))
times_in(0, X_) → times_out(0)
U3(Y, times_out(XY)) → U4(plus_in(XY, Y))
U4(plus_out(Z)) → times_out(Z)
plus_in(s(X), Y) → U5(plus_in(X, Y))
plus_in(0, X) → plus_out(X)
U5(plus_out(Z)) → plus_out(s(Z))
times_in(x0, x1)
U3(x0, x1)
U4(x0)
plus_in(x0, x1)
U5(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U11(Xs, times_out(Z)) → FACTOR_IN(.(Z, Xs))
Used ordering: Polynomial interpretation [25]:
FACTOR_IN(.(X, .(Y, Xs))) → U11(Xs, times_in(X, Y))
POL(.(x1, x2)) = 1 + x2
POL(0) = 0
POL(FACTOR_IN(x1)) = x1
POL(U11(x1, x2)) = 1 + x1 + x2
POL(U3(x1, x2)) = 1
POL(U4(x1)) = 1
POL(U5(x1)) = 0
POL(plus_in(x1, x2)) = 0
POL(plus_out(x1)) = 0
POL(s(x1)) = 0
POL(times_in(x1, x2)) = 1
POL(times_out(x1)) = 1
times_in(0, X_) → times_out(0)
U3(Y, times_out(XY)) → U4(plus_in(XY, Y))
times_in(s(X), Y) → U3(Y, times_in(X, Y))
U4(plus_out(Z)) → times_out(Z)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
FACTOR_IN(.(X, .(Y, Xs))) → U11(Xs, times_in(X, Y))
times_in(s(X), Y) → U3(Y, times_in(X, Y))
times_in(0, X_) → times_out(0)
U3(Y, times_out(XY)) → U4(plus_in(XY, Y))
U4(plus_out(Z)) → times_out(Z)
plus_in(s(X), Y) → U5(plus_in(X, Y))
plus_in(0, X) → plus_out(X)
U5(plus_out(Z)) → plus_out(s(Z))
times_in(x0, x1)
U3(x0, x1)
U4(x0)
plus_in(x0, x1)
U5(x0)